1. Field of the Invention
The present invention relates to a numerical controller, in particular, a numerical controller capable of neighboring point search with consideration for an attitude of a tool.
2. Description of the Related Art
When a neighboring point search function is executed, a machining program is temporarily executed from the start, and the distance between two points of a current tool center point and a tool center point at each of block start points of blocks being temporarily executed is calculated. When this distance falls within the range of a set distance (neighboring point distance) and the tool center point further moves away from the current tool center point at the block end point of that block, this block start point is set as a neighboring point. When the neighboring point is determined, the tool is positioned at the neighboring point, enabling restart of the program from the block start point.
FIG. 6 (a nozzle for laser machining is taken as an example of the tool) illustrates a determination of a neighboring point using a neighboring point search function and a positioning for restart of the program under search. A block start point present within the range of a neighboring point distance from a tool center point is set as the neighboring point, and it is possible that the program is restarted in the same manner as when the program is executed to the block start point and then suspended.
As a prior art technique related to a determination of the shortest neighboring point on a machining path, a technique is known that selects, out of blocks in a machining program, a block in which a machining path passes within the range of a set distance and the distance to a current position of the tool is the shortest (for example, Japanese Patent Application Laid-Open No. 9-128027).
A neighboring point search function according to a prior art technique determines a neighboring point only with the distance between a tool center point in each block when a machining program is temporarily executed from the start and an actual tool center point. For this reason, when an attitude of the tool is changed but the movement of the tip thereof is small in three-dimensional machining and a plurality of block start points are present within a range of a neighboring point distance from the current tool position, for example, there has been a problem that a block start point that is not of the block originally desired to be restarted is set as a neighboring point in some cases.
For example, as illustrated in FIG. 7 (a nozzle for laser machining is taken as an example of the tool), some programs may cause a problem that a block start point, that is different from the block start point to which a tool tip is brought close in an attempt to restart the program, enters first the range of a neighboring point distance, with the result that this block start point may be determined as a neighboring point.